Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up E0733 explanation #74781

Merged
merged 1 commit into from
Aug 2, 2020
Merged

Conversation

GuillaumeGomez
Copy link
Member

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 26, 2020
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a general note - this explains how to fix the error, but not why it's an error in the first place. Do you know why? It's not obvious to me.

@@ -1,4 +1,6 @@
Recursion in an `async fn` requires boxing. For example, this will not compile:
An `async` function used recursion without boxing.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
An `async` function used recursion without boxing.
An [`async`] function used recursion without boxing.
[`async`]: https://doc.rust-lang.org/std/keyword.async.html

@@ -8,8 +10,8 @@ async fn foo(n: usize) {
}
```

To achieve async recursion, the `async fn` needs to be desugared
such that the `Future` is explicit in the return type:
To achieve async recursion, the `async fn` needs to be desugared such that the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To achieve async recursion, the `async fn` needs to be desugared such that the
To perform async recursion, the `async fn` needs to be desugared such that the

@GuillaumeGomez
Copy link
Member Author

@jyn514 I assume that it's because of the stack but honestly, I'm not really sure.

@jyn514
Copy link
Member

jyn514 commented Aug 2, 2020

@bors r+ rollup=always

🤷 mysteries of async

@bors
Copy link
Contributor

bors commented Aug 2, 2020

📌 Commit 507f403 has been approved by jyn514

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 2, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 2, 2020
Rollup of 10 pull requests

Successful merges:

 - rust-lang#74686 (BTreeMap: remove into_slices and its unsafe block)
 - rust-lang#74762 (BTreeMap::drain_filter should not touch the root during iteration)
 - rust-lang#74781 (Clean up E0733 explanation)
 - rust-lang#74874 (BTreeMap: define forget_type only when relevant)
 - rust-lang#74974 (Make tests faster in Miri)
 - rust-lang#75010 (Update elasticlunr-rs and ammonia transitive deps)
 - rust-lang#75041 (Replaced log with tracing crate)
 - rust-lang#75044 (Clean up E0744 explanation)
 - rust-lang#75054 (Rename rustc_middle::cstore::DepKind to CrateDepKind)
 - rust-lang#75057 (Avoid dumping rustc invocations to stdout)

Failed merges:

 - rust-lang#74827 (Move bulk of BTreeMap::insert method down to new method on handle)

r? @ghost
@bors bors merged commit 5323b9f into rust-lang:master Aug 2, 2020
@GuillaumeGomez GuillaumeGomez deleted the cleanup-e0733 branch August 2, 2020 19:04
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants